import Vue from 'vue'
import Router from 'vue-router'

const _import = require('./_import_' + process.env.NODE_ENV)

Vue.use(Router)

/* 框架布局 */
import Layout from '@/views/layout/Layout';

//基本请求路由
export const constantRouterMap = [
  {path: '/login', component: _import('login/index'), hidden: true},
  {path: '/authredirect', component: _import('login/authredirect'), hidden: true},
  {path: '/404', component: _import('errorPage/404'), hidden: true},
  {path: '/401', component: _import('errorPage/401'), hidden: true},
  {path: '/screenbind', component: _import('screenbind/index'), hidden: true},
  {
    path: '',
    component: Layout,
    redirect: 'dashboard',
    children: [{
      name: '首页',
      icon: 'dashboard',
      path: 'dashboard',
      component: _import('dashboard/index')
    }]
  }
]

export default new Router({
  routes: constantRouterMap
})


